home *** CD-ROM | disk | FTP | other *** search
/ PC World 1999 December / PCWorld_1999-12_cd.bin / Software / Servis / UrthMDB / Urthman's MDB Headers.ht_ / Urthman's MDB Headers.ht
Text File  |  1999-10-03  |  13KB  |  284 lines

  1. <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
  2. <html>
  3.  
  4. <head>
  5. <meta http-equiv="Content-Type"
  6. content="text/html; charset=iso-8859-1">
  7. <meta name="GENERATOR" content="Microsoft FrontPage 2.0">
  8. <title>Headers and Trailers</title>
  9. </head>
  10.  
  11. <body bgcolor="#A3CDDA">
  12. <div align="center"><center>
  13.  
  14. <table border="1" cellpadding="8" cellspacing="0" width="100%"
  15. bgcolor="#5A8BAB">
  16.     <tr>
  17.         <td align="center" width="100%"><font color="#FFFF00"
  18.         size="6" face="Arial"><em><strong><b>Urthman's MDB
  19.         Construction Kit.</b></strong></em></font></td>
  20.     </tr>
  21. </table>
  22. </center></div><div align="center"><center>
  23.  
  24. <table border="0" cellpadding="4" cellspacing="4" width="100%">
  25.     <tr>
  26.         <td align="center"><font size="5" face="Arial"><em><b>ASCII
  27.         File Headers and Trailers</b></em></font></td>
  28.     </tr>
  29. </table>
  30. </center></div>
  31.  
  32. <p align="center"><font face="Arial"><strong>What are headers and
  33. trailers, and when, if at all, should they be used.</strong></font></p>
  34.  
  35. <hr>
  36. <div align="center"><center>
  37.  
  38. <table border="0" cellpadding="6" width="75%">
  39.     <tr>
  40.         <td align="center" width="50%"><a href="#Comma"><font
  41.         face="Arial"><strong>Comma Delimited Files</strong></font></a></td>
  42.         <td align="center" width="50%"> </td>
  43.     </tr>
  44.     <tr>
  45.         <td align="center" width="50%"><a href="#Fixed"><font
  46.         face="Arial"><strong>Fixed Record Length Files</strong></font></a></td>
  47.         <td align="center" width="50%"><a
  48.         href="Urthman's%20MDB%20Construction%20Kit.htm"><font
  49.         face="Arial"><strong>Main Document</strong></font></a></td>
  50.     </tr>
  51. </table>
  52. </center></div>
  53.  
  54. <hr>
  55.  
  56. <p><a name="Comma"><font face="Arial"><strong>Comma</strong></font></a><font
  57. face="Arial"><strong> Delimited File formats:</strong></font></p>
  58.  
  59. <p><font size="2" face="Arial">In comma-delimited files, the
  60. header record contains the column headings for the data records
  61. that follow that header record. Generally, this file format is
  62. used to transfer files from one database or spreadsheet program
  63. to another without having to be too concerned about the sender
  64. and recipient having the same spread sheet or database program.
  65. The header information is used as column headings in a users
  66. spread sheet program, and to inform the software importing the
  67. data, where each element in each data record should go.</font></p>
  68.  
  69. <p><font size="2" face="Arial">The code generated by the <strong>Urthman's
  70. MDB Construction Kit</strong> for exporting comma delimited files
  71. includes an option to write a header record containing the data
  72. field names. The code generated for importing comma delimited
  73. formats uses the header record to align the columns of data with
  74. the appropriate corresponding fields of the database table into
  75. which the data is being imported. This permits the following
  76. scenario:</font></p>
  77.  
  78. <ol>
  79.     <li><font size="2" face="Arial">The software exports selected
  80.         data records from a data base to a CSV file with headers.</font></li>
  81.     <li><font size="2" face="Arial">A user imports this data into
  82.         a spreadsheet, and reorganizes the columns to suit his or
  83.         her needs.</font></li>
  84.     <li><font size="2" face="Arial">The user makes some minor
  85.         edits to some of the data and exports this to a comma
  86.         delimited file.</font></li>
  87.     <li><font size="2" face="Arial">The software imports the
  88.         data, and the minor edits become written into the
  89.         database.</font></li>
  90. </ol>
  91.  
  92. <p><font size="2" face="Arial">The most significant part is that
  93. the data is imported into the correct data fields despite the
  94. fact that the columns have been moved around, and some columns
  95. may have been deleted. Columns that have been removed will result
  96. in null or default data in the record.</font></p>
  97.  
  98. <hr>
  99. <div align="center"><center>
  100.  
  101. <table border="0" cellpadding="4" cellspacing="0" width="100%">
  102.     <tr>
  103.         <td valign="top"><a name="Fixed"><font size="3"
  104.         face="Arial"><strong>Fixed</strong></font></a><font
  105.         size="3" face="Arial"><strong> Length Record formats:</strong></font></td>
  106.         <td><p align="center"><font face="Arial"><strong>Schematic</strong></font></p>
  107.         </td>
  108.     </tr>
  109.     <tr>
  110.         <td valign="top" width="50%"><font size="2" face="Arial">The
  111.         fixed record length file format is the predominant
  112.         practice found in the exchange of data within the
  113.         telecommunications, insurance and banking industries.
  114.         Often, file and batch headers and trailers are used for
  115.         organizing the data within the files.</font><p><font
  116.         size="2" face="Arial">In fixed length record formats,
  117.         header and trailer records are used for grouping detail
  118.         records by a type or category The header record contains
  119.         some common data element(s) shared by the enclosed detail
  120.         records, while the trailer record might repeat the same
  121.         data elements as the header, and also contain some
  122.         summary data used to validate the integrity of the
  123.         enclosed data.</font></p>
  124.         <p><font size="2" face="Arial">Fixed length record
  125.         formatted files can include both a file header and
  126.         trailer, as well as batch header and trailer groups. This
  127.         is generally a practice used where multiple companies are
  128.         sending or receiving data files between each other. The
  129.         file header might contain data that identifies who the
  130.         sending and receiving companies are, and the trailer
  131.         record might contain a summary of the enclosed batches.</font></p>
  132.         </td>
  133.         <td align="center" valign="top" width="50%"><div
  134.         align="center"><center><table border="1" cellpadding="4"
  135.         width="90%" bgcolor="#0000FF">
  136.             <tr>
  137.                 <td align="center"><font color="#FFFF00" size="2"
  138.                 face="Arial"><strong>FILE HEADER RECORD<br>
  139.                 </strong></font><div align="center"><center><table
  140.                 border="1" cellpadding="4" width="75%"
  141.                 bgcolor="#C0C0C0">
  142.                     <tr>
  143.                         <td align="center"><font color="#800080"
  144.                         size="2" face="Arial"><strong>BATCH
  145.                         HEADER RECORD<br>
  146.                         </strong></font><div align="center"><center><table
  147.                         border="1" cellpadding="4"
  148.                         bgcolor="#FFFFFF">
  149.                             <tr>
  150.                                 <td align="center"><font
  151.                                 color="#004080" size="2"
  152.                                 face="Arial"><strong>DATA DETAIL
  153.                                 RECORD</strong></font><p><font
  154.                                 color="#004080" size="2"
  155.                                 face="Arial"><strong>DATA DETAIL
  156.                                 RECORD</strong></font></p>
  157.                                 <p><font color="#004080" size="2"
  158.                                 face="Arial"><strong>DATA DETAIL
  159.                                 RECORD</strong></font></p>
  160.                                 </td>
  161.                             </tr>
  162.                         </table>
  163.                         </center></div><p><font color="#800080"
  164.                         size="2" face="Arial"><strong>BATCH
  165.                         TRAILER RECORD</strong></font></p>
  166.                         </td>
  167.                     </tr>
  168.                 </table>
  169.                 </center></div><div align="center"><center><table
  170.                 border="1" cellpadding="4" width="75%"
  171.                 bgcolor="#C0C0C0">
  172.                     <tr>
  173.                         <td align="center"><font color="#800080"
  174.                         size="2" face="Arial"><strong>BATCH
  175.                         HEADER RECORD<br>
  176.                         </strong></font><div align="center"><center><table
  177.                         border="1" cellpadding="4"
  178.                         bgcolor="#FFFFFF">
  179.                             <tr>
  180.                                 <td align="center"><font
  181.                                 color="#004080" size="2"
  182.                                 face="Arial"><strong>DATA DETAIL
  183.                                 RECORD</strong></font><p><font
  184.                                 color="#004080" size="2"
  185.                                 face="Arial"><strong>DATA DETAIL
  186.                                 RECORD</strong></font></p>
  187.                                 <p><font color="#004080" size="2"
  188.                                 face="Arial"><strong>DATA DETAIL
  189.                                 RECORD</strong></font></p>
  190.                                 </td>
  191.                             </tr>
  192.                         </table>
  193.                         </center></div><p><font color="#800080"
  194.                         size="2" face="Arial"><strong>BATCH
  195.                         TRAILER RECORD</strong></font></p>
  196.                         </td>
  197.                     </tr>
  198.                 </table>
  199.                 </center></div><p><font color="#FFFF00" size="2"
  200.                 face="Arial"><strong>FILE TRAILER RECORD</strong></font></p>
  201.                 </td>
  202.             </tr>
  203.         </table>
  204.         </center></div></td>
  205.     </tr>
  206. </table>
  207. </center></div>
  208.  
  209. <p><font size="2" face="Arial">The <strong>Urthman's MDB
  210. Construction Kit</strong> allows you, the programmer, to select
  211. header and trailer record layouts for any given table, and to
  212. define up to three elements for each of the headers and trailers
  213. as recognition codes. While importing data, the incoming record
  214. is tested for these recognition elements, and when encountered,
  215. the header or trailer record is broken out into it's component
  216. parts as needed. Also, during this import function, a variable (<strong>RecType</strong>)
  217. is set to indicate the record that had just been imported.</font></p>
  218.  
  219. <ul>
  220.     <li><font size="2" face="Arial"><strong>HDR</strong> - Comma
  221.         Delimited Header record</font></li>
  222.     <li><font size="2" face="Arial"><strong>DTL</strong> - Comma
  223.         Delimited Detail record</font></li>
  224.     <li><font size="2" face="Arial"><strong>FHD</strong> - Fixed
  225.         Length File Header record - the beginning of a file</font></li>
  226.     <li><font size="2" face="Arial"><strong>FTL</strong> - Fixed
  227.         Length File Trailer record - the end or summary of a file</font></li>
  228.     <li><font size="2" face="Arial"><strong>BHD</strong> - Fixed
  229.         Length Batch Header record - the beginning of a batch</font></li>
  230.     <li><font size="2" face="Arial"><strong>BTL</strong> - Fixed
  231.         Length Batch Trailer record - the end or summary of a
  232.         batch</font></li>
  233.     <li><font size="2" face="Arial"><strong>DET</strong> - Fixed
  234.         Length Detail record</font></li>
  235. </ul>
  236.  
  237. <p><font size="2" face="Arial">The Construction Kit also sets up
  238. the subroutines necessary for exporting these same headers and
  239. trailers. Please note that the same elements used to identify
  240. these records are included in the generated code, where the
  241. values of these elements are set just before writing the record
  242. to the file.</font></p>
  243.  
  244. <hr>
  245. <div align="center"><center>
  246.  
  247. <table border="0" cellpadding="8" cellspacing="0" width="100%">
  248.     <tr>
  249.         <td align="center" width="33%"><div align="center"><center><table
  250.         border="0" cellpadding="8" cellspacing="0"
  251.         bgcolor="#C0C0C0">
  252.             <tr>
  253.                 <td align="right" valign="top"><font
  254.                 color="#000000" size="1" face="Arial"><strong>Contact:</strong></font></td>
  255.                 <td valign="top"><font color="#000000" size="1"
  256.                 face="Arial"><strong>John Stanley Enterprises</strong><br>
  257.                 PO Box 1672<br>
  258.                 Valrico, FL 33595-1672</font></td>
  259.             </tr>
  260.             <tr>
  261.                 <td align="right" valign="top"><font size="1"
  262.                 face="Arial"><strong>URL:</strong></font></td>
  263.                 <td><a href="http://www.a-znet.com/jse/"><font
  264.                 size="1" face="Arial"><strong>http://www.a-znet.com/jse/</strong></font></a></td>
  265.             </tr>
  266.             <tr>
  267.                 <td align="right" valign="top"><font
  268.                 color="#000000" size="1" face="Arial"><strong>Email:</strong></font></td>
  269.                 <td valign="top"><a href="mailto:urthman@usa.net"><font
  270.                 color="#000000" size="1" face="Arial"><strong>urthman@usa.net</strong></font></a><font
  271.                 color="#000000" size="1" face="Arial"><strong> </strong></font></td>
  272.             </tr>
  273.         </table>
  274.         </center></div></td>
  275.         <td align="center" width="33%"> </td>
  276.         <td align="center" width="33%"><font size="1"
  277.         face="Arial">Microsoft, Windows, NT and Visual Basic are
  278.         registered trademarks of the Microsoft Corporation.</font></td>
  279.     </tr>
  280. </table>
  281. </center></div>
  282. </body>
  283. </html>
  284.